<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.jaxplat.commons.Row"%>
<%@page import="com.jaxplat.commons.RowImpl"%>
<%@page import="com.rs.rsbiz.reserve.entity.ReserveOrder"%>
<%@page import="com.jaxplat.util.DateUtils"%>
<%@page import="com.rs.rsbiz.reserve.entity.ReserveOrderBill"%>
<%
    String contextPath = request.getContextPath();
			ReserveOrder lockedOrder = new ReserveOrder();
			if (null != request.getAttribute("lockedOrder")
					&& request.getAttribute("lockedOrder") instanceof ReserveOrder) {
				lockedOrder = (ReserveOrder) request
						.getAttribute("lockedOrder");
			}
			Row dsInfo = (Row) request.getAttribute("dsInfo");
			ReserveOrderBill orderBill = (ReserveOrderBill) request
					.getAttribute("orderBill");

			Row callbackInfo = (Row) request.getAttribute("callbackInfo");

			String token = null;//令牌号
			String url = null;
			String method = null;
			String sessionId = null;

			token = callbackInfo.getString("token");
			url = callbackInfo.getString("url");
			method = callbackInfo.getString("method");
			sessionId = callbackInfo.getString("sessionId");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta content="<%=session.getAttribute("keywords")%>" name="Keywords">
		<meta content="<%=session.getAttribute("description")%>" name="description">
		<title>预约挂号、预约诊疗-云南移动无线城市</title>
		<link rel="stylesheet" type="text/css" href="<%=contextPath%>/css2/style.css" />
		<script type="text/javascript" src="<%=contextPath%>/js/jquery-easyui-1.3/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="<%=contextPath%>/js/blockUI/jquery.blockUI.js"></script>
		<script type="text/javascript" src="<%=contextPath %>/js/common.js"></script>
		<script type="text/javascript">
		function submitForm() 
		{
			$("#form1").attr('target','_blank');
			$("#form1").submit();
			$.blockUI({ message: $('#divPayResultNav'), css: { width: '275px' } }); 
			
		}
		function gotoPayResult(payResult)
		{
			if(payResult==0)
			{
				document.location.href='<%=contextPath%>/web2/reserveManageAction.do?method=viewReserveOrder&orderId=<%=lockedOrder.getOrderId()%>';
			}
			else
			{
				document.location.href='<%=contextPath%>/web2/reserveManageAction.do?method=viewReserveOrder&orderId=<%=lockedOrder.getOrderId()%>';
				//$.unblockUI(); 
			}
		}
		</script>

<!--[if IE 6]>
 <style type="text/css">
 .w942m {
	width:942px;
	margin:0 auto;
	margin-top:150px;
}
.main_left .main_box_title {
	background: url("../images/h4bg.png") no-repeat scroll left top transparent;
	height:43px;
	margin-left:-10px;
	position:absolute;
	top:10px;
}
 </style>
<![endif]-->

<!--[if IE 7]>
 <style type="text/css">
 .w942m {
	width:942px;
	margin:0 auto;
	margin-top:150px;
}
.main_left .main_box_title {
	background: url("../images/h4bg.png") no-repeat scroll left top transparent;
	height:43px;
	margin-left:-10px;
	position:absolute;
	top:10px;
}
 </style>
<![endif]-->

	</head>
	<body>
		<%=request.getSession().getAttribute("headerContentWeb")%>
		<div class="guahao">
			<!--start header-->
			<%@ include file="head.jsp"%>
			<!--end header-->
			<div class="clear mb8"></div>
			<!--start main-->
			
			<div class="main w942m">
				<div class="main_left2 fl w150">
					<div class="main_box">
						<div class="main_box_title">
							<div class="titleleft fl"></div>
							<div class="right_titlemain fl">
								<h4 class="h4">
									预约管理
								</h4>
							</div>
							<div class="titleright fl"></div>
						</div>
						<div class="right_main_box_cont">
							<!--navlist开始-->
							<ul class="navlist">
								<li>
									<a href="<%=contextPath%>/web2/reserveManageAction.do?method=reserverOrderList&flag=1&browseFalg=web">未支付预约</a>
								</li>
								<li>
									<a href="<%=contextPath%>/web2/reserveManageAction.do?method=reserverOrderList&flag=2&browseFalg=web">我的预约</a>
								</li>
								<li>
									<a href="<%=contextPath%>/web2/reserveManageAction.do?method=reserverOrderList&flag=3&browseFalg=web">历史预约</a>
								</li>
								<li>
									<a href="<%=contextPath%>/web2/reserveManageAction.do?method=reserverOrderList&flag=4&browseFalg=web">常用联系人</a>
								</li>
							</ul>
							<!--navlist结束-->
						</div>
						<!--end left_main_box_cont-->
						<div class="right_box_bottom mb8"></div>
					</div>
					<!--end main_box-->
				</div>
				<!--end main_left-->
				<div class="main_right2 fl w780">
					<div class="main_box_list">
						<div class="once_top"></div>
						<div class="right_main_box_cont">
							<div class="box_keylist">
								<div class="step">
									<span>选择</span><span>→</span><span>填写信息</span><span>→</span><span>支付</span><span>→</span><span class="on">完成预约</span>
								</div>
								<div class="bc psucess">
									<div class="thks">
										<p>
											亲爱的用户：
											<br />
											&nbsp;&nbsp;&nbsp;&nbsp;感谢使用
											<a href="http://www.ynicity.cn">云南移动无线城市</a>-手机预约挂号系统！
											<br />
											&nbsp;&nbsp;&nbsp;&nbsp;您的预约挂号支付成功后，您将收到扣费通知和预约信息短信， 请您保存好您接收到的信息。您也可以进入
											<a href="<%=contextPath%>/wap/searchMyReserve.jsp">我的预约</a>页面查看预约订单状态。
										</p>
									</div>
									<div class="list_table">
										<table border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed;" width="100%"
											class="infro2_table">
											<tr>
												<td colspan="6" class="th textL">
													预约基本信息
												</td>
											</tr>
											<tr>
												<td width="90px" class="apps_firstth1 textR">
													专家名称：
												</td>
												<td width="160px">
													<%=dsInfo.getString("doctor_name")%>
												</td>
												<td width="90px" class="textR">
													专家职称：
												</td>
												<td width="160px">
													<%=dsInfo.getString("pro_title_name") %> 
												</td>
												<td width="90px" class="textR">
													预约时间：
												</td>
												<td class="apps_firstth2">
													<%=DateUtils.formatDateToMin(lockedOrder.getReserveTime())%>
												</td>
											</tr>
											<tr>
												<td class="apps_firstth1 textR">
													所属科室：
												</td>
												<td>
													<%=dsInfo.getString("sec_name")%>
												</td>
												<td class="textR">
													医院名称：
												</td>
												<td colspan="3" class="apps_firstth2">
													<%=dsInfo.getString("hos_name")%>
												</td>
											</tr>
											<tr>
												<td colspan="6" class="th textL">
													支付信息
												</td>
											</tr>
											<tr>
												<td width="90px" class="apps_firstth1 textR">
													支付方式：
												</td>
												<td width="100px">
													<%
													    if ("1".equals(orderBill.getPayType().toString())) {
																	out.print("手机支付");
																}
													%>
												</td>
												<td width="90px" class="textR">
													支付手机号：
												</td>
												<td width="100px"><%=lockedOrder.getMobileNo()%></td>
												<td width="90px" class="textR">
													挂号费 + 信息费：
												</td>
												<td  style="color:#FF0000;">
													<%=com.rs.util.Utils.formatMoney(RsConstant.DOCTOR_FEE.getDouble(dsInfo.getString("pro_title")), "0.00")%>元  
												  + <%=com.rs.util.Utils.formatMoney(RsConstant.RS_INFO_SERVICE_FEE, "0.00")%>元
												</td>

											</tr>
											<tr>
												<td colspan="6" class="th textL">
													患者基本信息
												</td>
											</tr>
											<tr>
												<td width="90px" class="apps_firstth1 textR">
													患者姓名：
												</td>
												<td width="160px">
													<%=lockedOrder.getApplicantName()%>
												</td>
												<td width="90px" class="textR">
													身份证号：
												</td>
												<td width="160px"><%=lockedOrder.getIdNo()%></td>
												<td width="90px" class="textR">
													性别：
												</td>
												<td class="apps_firstth2">
													<%
													    if ("m".equals(lockedOrder.getGender())) {
																	out.print("男");
																} else {
																	out.print("女");
																}
													%>
												</td>
											</tr>
											<tr>
												<td class="apps_firstth1 textR">
													出生日期：
												</td>
												<td>
													<%=lockedOrder.getBirthDate()%>
												</td>
												<td class="textR">
													住址：
												</td>
												<td colspan="3" class="apps_firstth2">
													<%=lockedOrder.getApplicantAddr()%>
												</td>
											</tr>
										</table>

									</div>
										<div class="btn_div">
											<form id="form1" name="form1" method="<%=method == null ? "post" : method%>"
												action="<%=url == null ? "" : url%>">
												<input name="SESSIONID" type="hidden" id="SESSIONID" value="<%=sessionId == null ? "" : sessionId%>" />
												<a href="javascript:void(0)" onclick="submitForm()" class="btn_blue">支&nbsp;&nbsp;付</a>&nbsp;&nbsp; &nbsp;
											</form>
										</div>
										<div class="clear"></div>
									<div class="note">
										<div class="n_div">
											<h1 class="h1">
												重要声明：
											</h1>
										</div>
										<p>
											&nbsp;&nbsp;&nbsp;&nbsp;您的订单已提交，当您支付成功后， 方视为您与手机预约系统之间就实际直接建立了合同关系，将从您的手机银行账户中扣除预约挂号费。
										</p>
										<p>
											&nbsp;&nbsp;&nbsp;&nbsp;您也可以在您预约的时间前一天拔打12580，通过语音服务取消预约，并退回预约挂号费。
										</p>
									</div>
									<div class="clear"></div>
								</div>
								<!--end bc-->
							</div>
							<!--end inbox-->
						</div>
						<!--end right_main_box_cont-->
						<div class="left_box_bottom mb8"></div>
					</div>
					<!--end main_box-->
				</div>
				<!--end main_right-->
			</div>
			<!--end main_left-->
		</div>
		<!--end main-->
		<div class="clear"></div>
		</div>
		
      <div id="divPayResultNav" class="main_box" style="display:none;">

          <!--end main_box_title-->
          <div class="keylinks" style="height:100px;padding-top:40px;">
				<a class="btn_blue" onclick="gotoPayResult(0);" href="javascript:void(0)">支付成功</a>
				<a class="btn_blue" onclick="gotoPayResult(1)" href="javascript:void(0)">支付失败</a>
          </div>
        
      </div>
	</body>
</html>